home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_mac.hqx / SRGP port to 5.0 (compressed) / SRGP_SPHIGS Root / MacSRGP / Applications / testtimestamp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-13  |  699 b   |  31 lines

  1. #include "srgp.h"
  2. #include <stdio.h>
  3.  
  4. #include "testtimestamp.proto.h"
  5.  
  6. main(void)
  7. {
  8.    deluxe_locator_measure locmeasure;
  9.    int whichdev;
  10.    char buff[50];
  11.  
  12.  
  13.    SRGP_begin ("Testing timestamps!", 400,400, 1, FALSE);
  14.  
  15.    SRGP_setLocatorButtonMask(LEFT_BUTTON_MASK);
  16.    SRGP_setInputMode(LOCATOR, EVENT);   
  17.  
  18.    while (1) {
  19.       SRGP_waitEvent(INDEFINITE);
  20.       SRGP_getDeluxeLocator(&locmeasure);
  21.       if (locmeasure.modifier_chord[SHIFT] == DOWN)
  22.      exit(0);
  23.       sprintf (buff, "%d:%2d", 
  24.            locmeasure.timestamp.seconds, locmeasure.timestamp.ticks);
  25.       SRGP_text (locmeasure.position, buff);
  26.       /* Swallow the UP event. */
  27.       while(LOCATOR!=SRGP_waitEvent(INDEFINITE));
  28.    }
  29. }
  30.  
  31.